package com.example;

import java.util.ArrayList;

/**
 * Created by zhangguobao on 2016/12/23.
 */
public class StringTest {
    public static void main(String[] args) {
        java.util.List<String> list = new ArrayList<>();
        list.add("asd");
        list.add("asd");
//        list.add("adssd");
//        list.add("asd");
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < list.size(); i++) {
            String s = list.get(i);
            sb.append(s);
            if (i != list.size() - 1) {
                sb.append(",");
            }
        }
        System.out.println(sb.toString());
    }
}
